package com.itheima.CSM_bacK.aaaControllers;

import com.itheima.CSM_bacK.aabServices.Serv.GenerateFileService;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.Map;

@RestController
public class FreeMarkController {
    @Autowired
    GenerateFileService generateFileService;

    @RequestMapping("/free")
    public String index() throws Exception {

        generateFileService.generateFile("mobile_setmeal");

        return "success";
    }
}
